//
//  MyView.m
//  CWRD
//
//  Created by lanou on 15/9/17.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "MyView.h"

@implementation MyView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self addView];
        
    }
    return self;
}

- (void)addView{
    //我的收藏
    self.myCollection = [UIButton buttonWithType:UIButtonTypeCustom];
    self.myCollection.frame = CGRectMake(kWidth - 360, kHeight - 520, 100, 30);
    [self.myCollection setTitle:@"我的收藏" forState:UIControlStateNormal];
    [self.myCollection setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal];
    self.myCollection.titleLabel.font = [UIFont fontWithName:@"FZLTZCHJW--GB1-0" size:12.0];
    self.myCollection.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
    [self addSubview:self.myCollection];
    
    //我的缓存
    self.myCache = [UIButton buttonWithType:UIButtonTypeCustom];
    self.myCache.frame = CGRectMake(kWidth - 360, kHeight - 460, 100, 30);
    [self.myCache setTitle:@"我的缓存" forState:UIControlStateNormal];
    [self.myCache addTarget:self action:@selector(myCache) forControlEvents:UIControlEventTouchUpInside];
    [self.myCache setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal];
    self.myCache.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
    self.myCache.titleLabel.font = [UIFont fontWithName:@"FZLTZCHJW--GB1-0" size:12.0];
    [self addSubview:self.myCache];
    
    //开关
    self.mySwitch = [UIButton buttonWithType:UIButtonTypeCustom];
    self.mySwitch.frame = CGRectMake(kWidth - 360, kHeight - 400, 100, 30);
    [self.mySwitch setTitle:@"功能开关" forState:UIControlStateNormal];
    [self.mySwitch addTarget:self action:@selector(mySwitch) forControlEvents:UIControlEventTouchUpInside];
    [self.mySwitch setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal];
    self.mySwitch.titleLabel.font = [UIFont fontWithName:@"FZLTZCHJW--GB1-0" size:12.0];
    self.mySwitch.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
    [self addSubview:self.mySwitch];
    
    //我要投稿
    self.contribute = [UIButton buttonWithType:UIButtonTypeCustom];
    self.contribute.frame = CGRectMake(kWidth - 360, kHeight - 340, 100, 30);
    [self.contribute setTitle:@"我要投稿" forState:UIControlStateNormal];
    [self.contribute addTarget:self action:@selector(contribute) forControlEvents:UIControlEventTouchUpInside];
    [self.contribute setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal];
    self.contribute.titleLabel.font = [UIFont fontWithName:@"FZLTZCHJW--GB1-0" size:12.0];
    self.contribute.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
    [self addSubview:self.contribute];
    
    //更多
    self.more = [UIButton buttonWithType:UIButtonTypeCustom];
    self.more.frame = CGRectMake(kWidth - 360, kHeight - 280, 60, 30);
    [self.more setTitle:@"更多" forState:UIControlStateNormal];
    [self.more addTarget:self action:@selector(more) forControlEvents:UIControlEventTouchUpInside];
    [self.more setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal];
    self.more.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;
    self.more.titleLabel.font = [UIFont fontWithName:@"FZLTZCHJW--GB1-0" size:12.0];
    [self addSubview:self.more];
    
}

@end




